//
//  NewCustomButton.m
//  Shengzhuli
//
//  Created by FXGuo on 2018/1/17.
//  Copyright © 2018年 kamangkeji. All rights reserved.
//

#import "NewCustomButton.h"



@implementation NewCustomButton

- (instancetype)initWithFrame:(CGRect)frame
{
    if (self = [super initWithFrame:frame]) {
        [self createCountLab];
    }
    return self;
}

- (instancetype)initWithCoder:(NSCoder *)aDecoder
{
    if (self = [super initWithCoder:aDecoder]) {
        [self createCountLab];
    }
    return self;
}
- (void)createCountLab
{
    UILabel *lab = [[UILabel alloc]init];
    lab.text = @"0";
    lab.font = FontB(14);
    lab.textAlignment = NSTextAlignmentCenter;
    lab.textColor = [UIColor blackColor];
    self.countLab = lab;
    [self addSubview:lab];
    self.titleLabel.textAlignment = NSTextAlignmentCenter;
    self.titleLabel.font = Font(14);
}
- (void)layoutSubviews
{
    [super layoutSubviews];
    self.titleLabel.frame = CGRectMake(0, self.height-25, self.width, 20);
    self.countLab.frame = CGRectMake(0, 5, self.width, 20);
}

@end
